import request from '@/utils/request'

export function goodsCate(data) {
  return request({
    url: '/goods/cate',
    method: 'get',
    params: data
  })
}
export function goodsAddCate(data) {
  return request({
    url: '/goods/addCate',
    method: 'post',
    data
  })
}

export function goodsCateDetail(data) {
  return request({
    url: '/goods/cateDetail',
    method: 'get',
    params: data
  })
}

export function goodsCateUpdata(data) {
  return request({
    url: '/goods/cateUpdata',
    method: 'post',
    data
  })
}

export function goodsIndex(data) {
  return request({
    url: '/goods/index',
    method: 'get',
    params: data
  })
}
export function goodsDetail(query) {
  return request({
    url: '/goods/detail',
    method: 'get',
    params: query
  })
}

export function goodsAdd(data) {
  return request({
    url: '/goods/add',
    method: 'post',
    data
  })
}

export function goodsUpdate(data) {
  return request({
    url: '/goods/update',
    method: 'post',
    data
  })
}

export function updateAttrConfig(data) {
  return request({
    url: '/goods/updateAttrConfig',
    method: 'post',
    data
  })
}

export function updateAttrValue(data) {
  return request({
    url: '/goods/updateAttrValue',
    method: 'post',
    data
  })
}

export function addAttrValue(data) {
  return request({
    url: '/goods/addAttrValue',
    method: 'post',
    data
  })
}

